// fabu/xueyuan/xueyuanCom/radio/radio.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    key:{
       type:String,
       value:'学员性别'
    },
    radioArray:{
      type:Array,
      value:[{
        title:'男',
        id:'man'
      },
      {
        title:'女',
        id:'woman'
      }
      ]
    },
    sel:{
      type:String,
      value:'woman'
    },
    xingStyle: {
      type: String
    },
    xing: {
      type: String,
      value: '*'
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    selected:'woman'
  },
  attached:function(e)
  {
    this.setData({
      selected:this.properties.sel
    })
  },
  /**
   * 组件的方法列表
   */
  methods: {
   choose:function(event)
   {
     
    // console.log(event)
    var id=event.currentTarget.id
    if(id!='')
    {
      this.setData({
        selected:id
      })
    }
    this.triggerEvent('choose',{id})
   }
  }
})
